<template>
	<div class="contentbg-block" :style="{height:height}">
		<div class="titleBox">
			<div class="titleLeft"></div>
			<div class="titleRight"></div>
			<div class="titleCenter">{{title}}</div>
		</div>
		<div class="tempaltBox">
			<slot></slot>
		</div>
		<el-button class="backBtn" type="primary" size="small" v-if="isbackBtn" @click="backClick">{{backtext}}</el-button>
	</div>
</template>

<script>
	export default{
		props:{
			height:{
				stype:String,
				default:'81vh'
			},
			title:{
				stype:String,
				default:'企业标题'
			},
			isbackBtn:{
				type:Boolean,
				default:true
			},
			backtext:{
				type:String,
				default:'返回'
			},
			tabIndex: {
				type: Number,
				default: 0
			}
		},
		data(){
			return {
				isback:false
			}
		},
		methods:{
			backClick(){
				this.$emit('backClick')
				if(this.$route.path=='/enterprise/tabswich/childPage'){
					this.$router.go(-1)
				}else{
					this.$router.push({
						path:'/enterprise/distribution'
					})
				}
			}
		},
		mounted() {

		}
	}
</script>

<style scoped lang="scss">
	.contentbg-block{
		width: 100%;
    height: calc( 100% - 5.25vh );
    margin-top: 5.25vh;
		box-sizing: border-box;
		// background: url('../assets/images/centerqybg.png');
		background-size: 100% 100%;
		padding:5.5vh 2vw 0 2vw;
		box-sizing: border-box;
		// border:1px solid #00F9FC;
		position: relative;
    background-image: url("~@/assets/images/sub_back.png");
		// &::after{
		// 	content:'';
		// 	width: 100%;

		// 	height: 30vh;
		// }
		.titleBox{
			width:100%;
			height:10.5vh;
			position: absolute;
      top: -5.25vh;
      left: 0;
			.titleLeft{
				width:35%;
				height:100%;
				float: left;
				// background: url('../assets/images/left-1.png') no-repeat 0vh 7vh;
				background-size: 100%;
				background-repeat: repeat-x;
			}
			.titleRight{
				width:35%;
				height:100%;
				float: right;
				// background: url('../assets/images/right-1.png') no-repeat 0vh 7vh;
				background-size: 100%;
				background-repeat: repeat-x;
			}
			.titleCenter{
				width:30%;
				height:100%;
				margin:0 auto;
				background: url('../assets/images/titlebg.png');
				background-size: 100% 100%;
				text-align: center;
				line-height: 10.5vh;
				font-size: 1.15vw;
				font-family: Microsoft YaHei;
				font-weight: bold;
				color: #DAF1FF;
			}
		}
		.tempaltBox{
			width:100%;
			margin-top:1.5vh;
			height:auto;
			overflow: hidden;
		}
		.backBtn{
			width:4vw;
			height:3.5vh;
			position: absolute;
			top:2vh;
			right:2vw;
			background-image: url(../assets/images/back.png);
			background-size: 100% 100%;
			padding:0;
			outline: none;
			border-color: rgba(0,0,0,0);
			color:#03D3FF;
			border-radius: 9px;
			font-size:12px;
			box-sizing: border-box;
			text-indent:16px
		}
	}
</style>
